<!--供应商人员详情-->
<template>
  <el-dialog
    v-dialogDrag
    :title="dialogTitle"
    :visible.sync="dialogVisible"
    class="dialogStyleMiddle"
    :before-close="cancel"
  >
    <el-form
      v-if="dialogVisible"
      ref="addForm"
      class="dialog-form"
      :model="formData"
      label-width="auto"
    >
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="人员名称" prop="name">
            <span class="detail-info">{{ formData.name }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="人员类型" prop="surveyTypeName">
            <span class="detail-info">{{ formData.surveyTypeName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="" prop="phone">
            <label slot="label" v-html="`手&ensp;机&ensp;号`" />
            <span class="detail-info">{{ formData.phone }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="身份证号" prop="idCard">
            <span class="detail-info">{{ formData.idCard }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="所属企业" prop="enterpriseName">
            <span class="detail-info">{{ formData.enterpriseName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="所在地区" prop="regionName">
            <span class="detail-info">{{ formData.regionName }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="用户邮箱" prop="email">
            <span class="detail-info">{{ formData.email }}</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

<script>
// 证书图片
export default {
  loginName: 'detailDialog',
  props: {
    typeOptions: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      /* 新增 start*/
      dialogTitle: '', // 弹层标题
      dialogVisible: false, // 弹层是否显示
      btnDisabled: false, // 确定按钮
      formData: { // 新增数据
        userName: '', // 用户名称
        idCard: '', // 身份证
        phone: '',
        enterpriseName: '',
        regionName: '',
        email: ''
      }
      /* 新增 end*/
    }
  },
  methods: {
    /* 详情弹层 start*/
    // 从父组件获取参数的方法
    handleAdd(title, data) {
      this.dialogVisible = true
      this.dialogTitle = title
      this.formData = { ...data }
    },
    // 关闭
    cancel() {
      this.dialogVisible = false
    }
    /* 详情弹层 end*/
  }
}
</script>

